<?php
require './include/global.php';
require './include/validate.php';
require './include/all_left.php';
require_once './include/advisory_db.php';


$nav = new buildNav;
$total = $DB->fetch_one_array("SELECT COUNT(*) AS count FROM pa_job");
$nav->total_result = $total[count];
$nav->execute("SELECT * FROM pa_job ORDER BY jo_id DESC");

$page = $nav->pagenav();
$smarty->assign("page",$page);

$i=0;
while($list2 = $DB->fetch_array($nav->sql_result)){
   $data[$i]              = $list2;
   $data[$i][location]    = $list2[jo_city].", ".$state[$list2[jo_state]] ;

   $i++;
}
$smarty->assign("joblist",$data);


$sql      = "SELECT * FROM pa_advisory ORDER BY ad_id DESC LIMIT 0,9";
$result   = $DB->query($sql);
$i=0;
while($list = $DB->fetch_array($result)){
   $data_list[$i][a0] = $list[ad_uname];
   $data_list[$i][a1] = $jobcategory[$list[ad_industry]];
   $data_list[$i][a2] = $list[ad_jobtitle];
   $data_list[$i][a5] = $list[ad_id];
  $i++;
}
$smarty->assign("advlist",$data_list);

$smarty->assign('rss1',"<img src='images/ajax.gif' />");
$smarty->assign('rss2',"<img src='images/ajax.gif' />");

$smarty->display('header.tpl');
$smarty->display('allleft.tpl');
/*
$url = "http://feeds.reuters.com/reuters/technologyNews/";
$str = @file_get_contents($url);

@preg_match_all( '|		<title>(.*)</title>|U' , $str , $title);
@preg_match_all( '|		<link>(.*)</link>|U'   , $str , $link);
for($i=0;$i<10;$i++){
   $rss[$i][title]   = $title[1][$i];
   $rss[$i]['link']  = $link[1][$i]; 
}
$smarty->assign("rss",$rss);
*/
$smarty->display('advlist.tpl');

$smarty->display('allright.tpl');
$smarty->display('footer.tpl');
?>
